import { request } from '@umijs/max';

export async function loginAPI(body: any) {
  return request(`/auth/admin_login`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
  });
}

/**
 * 获取当前登录的用户信息
 * @returns
 */
export async function loadCurrentUserAPI() {
  return request(`/admin/managers/info`, {});
}
